package testers;

import java.util.GregorianCalendar;

import db.DataBaseUtil;
import utils.Article;
import utils.SingleArticleGrader;
import utils.SingleTokenizerAndPOSer;
import utils.Token;

public class SingelGraderTester {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String text="Stepping up its fight against Microsoft Corp. , Google Inc. acquired DocVerse , a technology startup that allows people to editMicrosoft Office files online. Google paid around $ 25 million for the San Francisco-basedcompany , according to a person familiar with the matter. In an interview , Jonathan Rochelle , group product manager forGoogle Apps , said Google acquired DocVerse to make it easier forpeople to transition from desktop software to online software. Thelatter is an area where Google is trying to get a leg up over ...";
		Article artcl=new Article(null,text,null,new GregorianCalendar());
		artcl.setCompany(DataBaseUtil.getCompanyByTicker("MSFT"));
		System.out.println(artcl.getCompany());
		SingleTokenizerAndPOSer.tokenizeAndPOS(artcl);
		//printTokens(artcl);
		System.out.println("FINISHED TOKENIZER");
		SingleArticleGrader grader=new SingleArticleGrader();
		grader.gradeArticle(artcl);
		System.out.println("*****************************");
		System.out.println(artcl.getTaggedText());
		System.out.println("*****************************");
		System.out.println(artcl.getGrade());
	}
	private static void printTokens(Article doc) {
		for (Token t:doc.getTokenedText()){
			System.out.println("WORD: "+t.getWord()+" POS: "+t.getPOS());
		}
		System.out.println("---------------------------------------------------");
		
	}
}
